<template>
  <i-frame v-model:src="url"></i-frame>
</template>

<script setup lang="ts">
import iFrame from '@/components/iFrame/index.vue';
import { onBeforeRouteLeave } from "vue-router";
import { RouterRecord } from "@/global/record/RouterRecord";

const router = useRouter();

const route = useRoute();

// const url = ref(import.meta.env.VITE_APP_BASE_API + "/swagger-ui/index.html")
const url = ref(import.meta.env.VITE_APP_BASE_API + "/doc.html")

window.open(url.value);
router.back();

onBeforeRouteLeave(() => {
  useTagsViewStore().delView(<RouterRecord>route);
})
</script>
